#include<stdio.h>
#include<string.h>

int main()
{
    printf("%ld\n",strlen("hello world"));
    if(strcmp("hello","hello")==0)
    {
        printf("same\n");
    }

    if(strncmp("hello","helloworld",5)==0)
    {
        printf("first 5 same\n");
    }

    char s[10]={0};
    strcpy(s,"mike");
    printf("%s\n",s);

    // char s2[10]={0};
    strncpy(s,"mikeadafafa",sizeof(s)/sizeof(s[0]));
    printf("%s\n",s);

    char s2[10]="milk";
    strcat(s2,"jack");
    printf("%s\n",s2);
    return 0;

    // char s2[10]="milk";
    strncat(s2,"jack",3);
    printf("%s\n",s2);

    char cpm1[]="helloworld";
    char cpm2[]="hello";
    char *index=strstr(cpm1,cpm2);
    if(index!=NULL)
    {
        printf("******");
        printf("%c\n",*index);
    }
    else
        printf("cant find!\n");
    return 0;
}